<!--
 * @Author: your name
 * @Date: 2023-01-05 19:14:31
 * @LastEditTime: 2023-01-05 19:51:20
 * @LastEditors: DESKTOP-4QFD9PO
 * @Description: In User Settings Edit
 * @FilePath: \ClothMes\src\views\YarnStrippings\YarnStripPingdemos.vue
-->
<template>
    <div class="main-container" id="main-container">
        <div style="background-color: #fff; height:100%;" id="ProductMasterData">
            <a-tabs   :lazy-load="true" type="card" @change="tabsChange" justify>
                <a-tab-pane title="拆纱" key="1" v-if="permissionStore.hasPermisson('cs.cs')">
                    <div style="height: 100%;">
                        <YarnStripPingDatas></YarnStripPingDatas>
                    </div>
                </a-tab-pane>
                <a-tab-pane title="拆纱工录入" key="2" v-if="permissionStore.hasPermisson('cs.csglr')">
                    <div style="height: 100%;">
                        <YarnStripPingDatasTypeIn></YarnStripPingDatasTypeIn>
                    </div>
                </a-tab-pane>
            </a-tabs>
        </div>
    </div>
</template>

<script lang="ts">
import { defineComponent, reactive, ref, } from 'vue'
import emitter from '@/hooks/useEventBus'
import YarnStripPingDatas from './component/YarnStripPingDatas.vue'
import YarnStripPingDatasTypeIn from './component/YarnStripPingDatasTypeIn.vue'
import usePermission from '@/store/modules/permission'
export default defineComponent({
    name: 'YarnStripPingdemos',
    setup() {

        const pageData = reactive({
            tableIndex: "1"
        })
      

        const tabsChange = (e: string | number) => {
            //    pageData.tableIndex = e as string
            emitter.emit('window-change')
            if (e === '1') {
                emitter.emit('YarnStripPingDatas')
            }else if(e==='2'){
                  emitter.emit('YarnStripPingDatasTypeIn')
            }
        }
        const permissionStore = usePermission()
        return {
            pageData,
            tabsChange,
            permissionStore
        }
    },
    components:{
        YarnStripPingDatas,
        YarnStripPingDatasTypeIn
    }
})
</script>
<style scoped>
.main-container {
    height: 100%;
}
:deep(.ag-cell) {
    border-right: 1px solid #dde2eb;
}

:deep(.ag-header-cell) {
    border-right: 1px solid #dde2eb;
}
:deep(.ag-cell-value) {
  user-select: initial;
  -moz-user-select: text;
  -ms-user-select: text;
  -webkit-user-select: text;
}
</style>